<?php
/**
* Seyret Featured Slider Module For Joomla
* @ All rights reserved
* @ Released under GPLv2.0
* @ version 1.2.1
* @ August 2009 by www.rumahbelanja.com
* @ Last updated on Nov 2009
**/	
 
defined('_JEXEC') or die('Restricted access');

$baseurl = JURI::base();

$width		 = $params->get( 'width', '250' );
$height		 = $params->get( 'height', '220' );
$outer_color = $params->get( 'outer_color', '#000' );
$inner_color = $params->get( 'inner_color', '#fff' );
$pagination_color = $params->get( 'pagination_color', '#0f0f0f' );
$inner_padding = $params->get( 'inner_padding', '5' );

?>
<script type="text/javascript" src="<?php echo $baseurl; ?>/modules/mod_seyret_featured_slider/inc_seyret_featured_slider/swfobject.js"></script>
<script type="text/javascript" src="<?php echo $baseurl; ?>/modules/mod_seyret_featured_slider/inc_seyret_featured_slider/contentslider.js"></script>
<style type="text/css">	
	.sliderwrapper{
	position: relative; /*leave as is*/
	overflow: hidden; /*leave as is*/
	width: 100%;
	height: <?php echo $height+2*$inner_padding;?>px;
	background: <?php echo $outer_color;?>;
	}

	.sliderwrapper .contentdiv{
	visibility: hidden; /*leave as is*/
	position: relative; /*leave as is*/
	left: 0;  /*leave as is*/
	top: 0;  /*leave as is*/
	padding: <?php echo $inner_padding;?>px;
	background: <?php echo $inner_color;?>;
	width: <?php echo $width;?>px; /*width of content DIVs within slider. Total width should equal slider's inner width (390+5+5=400) */
	height: <?php echo $height+$inner_padding;?>px;
	filter:progid:DXImageTransform.Microsoft.alpha(opacity=100);
	-moz-opacity: 1;
	opacity: 1;
	}

	.pagination{
	width: 100%; /*Width of pagination DIV. Total width should equal slider's outer width */
	text-align: center;
	padding: 10px 0px;
	background: <?php echo $pagination_color;?>;
	}

	.pagination a img,
	.pagination a:visited img{
	text-decoration: none; 
	border: 2px solid #222;
	}

	.pagination a:hover img, .pagination a.selected img{
	border: 2px solid red;
	}
</style>

<div id="slider" class="sliderwrapper">

<div class="contentdiv">
<div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
	var s1 = new SWFObject("<?php echo $baseurl; ?>/modules/mod_seyret_featured_slider/inc_seyret_featured_slider/player.swf","ply","<?php echo $width?>","<?php echo $height?>","9","#FFFFFF");
	s1.addParam("allowfullscreen","true");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("wmode","transparent");
	s1.addVariable("showLogo", "false");
	s1.addVariable("showVersionInfo","false");
	s1.addParam("flashvars","file=<?php echo $list[0]->videofile;?>&image=<?php echo $list[0]->sclink; ?>");
	s1.write("container");
</script>
</div>

<div class="contentdiv">
<div id="container2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
	var s1 = new SWFObject("<?php echo $baseurl; ?>/modules/mod_seyret_featured_slider/inc_seyret_featured_slider/player.swf","ply","<?php echo $width?>","<?php echo $height?>","9","#FFFFFF");
	s1.addParam("allowfullscreen","true");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("wmode","transparent");
	s1.addVariable("showLogo", "false");
	s1.addVariable("showVersionInfo","false");
	s1.addParam("flashvars","file=<?php echo $list[1]->videofile;?>&image=<?php echo $list[1]->sclink; ?>");
	s1.write("container2");
</script>
</div>

<div class="contentdiv">
<div id="container3"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
	var s1 = new SWFObject("<?php echo $baseurl; ?>/modules/mod_seyret_featured_slider/inc_seyret_featured_slider/player.swf","ply","<?php echo $width?>","<?php echo $height?>","9","#FFFFFF");
	s1.addParam("allowfullscreen","true");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("wmode","transparent");
	s1.addVariable("showLogo", "false");
	s1.addVariable("showVersionInfo","false");
	s1.addParam("flashvars","file=<?php echo $list[2]->videofile;?>&image=<?php echo $list[2]->sclink; ?>");
	s1.write("container3");
</script>
</div>


<div class="contentdiv">
<div id="container4"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
	var s1 = new SWFObject("<?php echo $baseurl; ?>/modules/mod_seyret_featured_slider/inc_seyret_featured_slider/player.swf","ply","<?php echo $width?>","<?php echo $height?>","9","#FFFFFF");
	s1.addParam("allowfullscreen","true");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("wmode","transparent");
	s1.addVariable("showLogo", "false");
	s1.addVariable("showVersionInfo","false");
	s1.addParam("flashvars","file=<?php echo $list[3]->videofile;?>&image=<?php echo $list[3]->sclink; ?>");
	s1.write("container4");
</script>
</div>

</div>

<div id="paginate-slider" class="pagination">

<a href="#" class="toc"><img src="<?php echo $list[0]->picturelink; ?>" width="80" height="60"></img></a>
<a href="#" class="toc"><img src="<?php echo $list[1]->picturelink; ?>" width="80" height="60"></img></a>
<a href="#" class="toc"><img src="<?php echo $list[2]->picturelink; ?>" width="80" height="60"></img></a> 
<a href="#" class="toc"><img src="<?php echo $list[3]->picturelink; ?>" width="80" height="60"></img></a>
<div style="text-align: right; font-size:8px; padding-right:3px; font-family:fantasy;"><a href="http://www.rumahbelanja.com" title="Seyret Featured Slider, Module by RumahBelanja.com">Seyret Slider</a></div>

</div>

<script type="text/javascript">

featuredcontentslider.init({
	id: "slider",  //id of main slider DIV
	contentsource: ["inline", ""],  
	toc: "markup",  //Valid values: "#increment", "markup", ["label1", "label2", etc]
	nextprev: ["Previous", "Next"],  //labels for "prev" and "next" links. Set to "" to hide.
	revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover"
	enablefade: [true, 0.2],  //[true/false, fadedegree]
	autorotate: [false, 3000],  //[true/false, pausetime]
	onChange: function(previndex, curindex){  //event handler fired whenever script changes slide
		//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
		//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
	}
})

</script>